package com.efrei.schoolmanager.views.components;

import java.awt.Dimension;
import java.text.Format;

import javax.swing.JFormattedTextField;

public class CustomFormattedTextField extends JFormattedTextField {
	private static final long serialVersionUID = 6955894490347556812L;

	// Dimension par defaut
	private final static Dimension TEXT_FIELD_DIMENSION = new Dimension(100, 20);

	public CustomFormattedTextField() {
		super();
		setPreferredSize(TEXT_FIELD_DIMENSION);
		setMaximumSize(TEXT_FIELD_DIMENSION);
	}

	public CustomFormattedTextField(String s) {
		super(s);
		setPreferredSize(TEXT_FIELD_DIMENSION);
		setMaximumSize(TEXT_FIELD_DIMENSION);
	}

	public CustomFormattedTextField(AbstractFormatter formatter) {
		super(formatter);
		setPreferredSize(TEXT_FIELD_DIMENSION);
		setMaximumSize(TEXT_FIELD_DIMENSION);
	}

	public CustomFormattedTextField(Format format) {
		super(format);
		setPreferredSize(TEXT_FIELD_DIMENSION);
		setMaximumSize(TEXT_FIELD_DIMENSION);
	}

	public CustomFormattedTextField(String s, Dimension d) {
		super(s);
		setPreferredSize(d);
		setMaximumSize(d);
	}
}
